package cn.iocoder.yudao.module.product.dal.mysql.cylinderinoutdetail;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.product.dal.dataobject.cylinderinoutdetail.CylinderInOutDetailDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.product.controller.admin.cylinderinoutdetail.vo.*;

/**
 * 钢瓶出入库详情 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface CylinderInOutDetailMapper extends BaseMapperX<CylinderInOutDetailDO> {

    default PageResult<CylinderInOutDetailDO> selectPage(CylinderInOutDetailPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CylinderInOutDetailDO>()
                .eqIfPresent(CylinderInOutDetailDO::getCylinderId, reqVO.getCylinderId())
                .eqIfPresent(CylinderInOutDetailDO::getOpType, reqVO.getOpType())
                .eqIfPresent(CylinderInOutDetailDO::getOwnerId, reqVO.getOwnerId())
                .eqIfPresent(CylinderInOutDetailDO::getOwnerType, reqVO.getOwnerType())
                .betweenIfPresent(CylinderInOutDetailDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(CylinderInOutDetailDO::getUpdator, reqVO.getUpdator())
                .orderByDesc(CylinderInOutDetailDO::getId));
    }

}